package net.yters.model.agents.concrete;

import java.io.IOException;
import java.util.TreeMap;

import net.yters.model.ModelState;
import net.yters.model.Environment.AGNT;
import net.yters.model.agents.Agent;
import net.yters.model.agents.TextAgent;
import net.yters.util.Box;


public class ExternalInputAgent extends TextAgent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3233845003468055794L;
	
	public ExternalInputAgent(TextAgent agent) throws IOException, ClassNotFoundException {
		super(agent);
	}
	
	public ExternalInputAgent(ModelState model) {
		super(model);

		f_type.f_value = new Double(AGNT.XTRN.ordinal());
	}

	@Override
	protected
	boolean decide(TreeMap<String, Box> input, Agent actuator) {
		if(actuator.f_state.get("id").f_value.equals(f_input.get("choice").f_value)) {
			return true;
		}
		
		return false;
	}

	@Override
	protected void initDecision() {
	}
}
